using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Sys;
using SqlSugar;

namespace FytSoa.Domain.Hr;

/// <summary>
/// 人力-工作日志
/// </summary>
[SugarTable("hr_work_log")]
public class HrWorkLog:Entity
{
    /// <summary>
    /// 员工编号
    /// </summary>
    [Required]
    public long EmployeeId { get; set; }
    
    /// <summary>
    /// 员工
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(EmployeeId))]
    public HrEmployee EmployeeObj { get; set; }


    /// <summary>
    /// 工作时间
    /// </summary>
    [Required]
    public string WorkTime { get; set; }

    /// <summary>
    /// 工作类型(1案头/2外勤)
    /// </summary>
    [Required]
    public int WorkType { get; set; } = 1;
    
    /// <summary>
    /// 工作类别例如开会
    /// </summary>
    [Required]
    public long WorkCategoryId { get; set; } = 0;
    
    /// <summary>
    /// 工作类别
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(WorkCategoryId))]
    public SysCode CategoryObj { get; set; }

    /// <summary>
    /// 工作内容
    /// </summary>
    public string JobContent { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}